package com.ruoyi.web.controller.epm;

import java.util.List;
import com.ruoyi.system.domain.EpmInformation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.system.domain.EpmInformationHistory;
import com.ruoyi.system.service.IEpmInformationHistoryService;
import com.ruoyi.common.core.page.TableDataInfo;

/**
 * 员工历史信息Controller
 * 
 * @author ruoyi
 * @date 2024-05-21
 */
@RestController
@RequestMapping("/Empment/history")
public class EpmInformationHistoryController extends BaseController
{
    @Autowired
    private IEpmInformationHistoryService epmInformationHistoryService;

    /**
     * 查询员工历史信息列表
     */
    @PreAuthorize("@ss.hasPermi('Empment:history:list')")
    @GetMapping("/list")
    public TableDataInfo list(EpmInformationHistory epmInformationHistory)
    {
        startPage();
        List<EpmInformation> list = epmInformationHistoryService.selectEpmInformationHistoryList(epmInformationHistory);
        return getDataTable(list);
    }

    /**
     * 获取员工历史信息详细信息
     */
    @PreAuthorize("@ss.hasPermi('Empment:history:query')")
    @GetMapping(value = "/{userId}")
    public TableDataInfo getInfo(@PathVariable("userId") int userId)
    {
        startPage();
        List<EpmInformationHistory> list=epmInformationHistoryService.selectEpmInformationHistoryById(userId);
        return getDataTable(list);


    }



}
